home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / numberh.dxr / 00002_version2 scripts.ls < prev    next >
Encoding:
Text File  |  1996-10-03  |  1.4 KB  |  57 lines

  1. on setMyVolume theChannel, theMacVol, thePCVol
  2.   if machineType() < 255 then
  3.     set the volume of sound theChannel to theMacVol
  4.   else
  5.     set the volume of sound theChannel to thePCVol
  6.   end if
  7. end
  8.  
  9. on FadeMyVolume theChannel, theTime, theGrain, theLevelMac, theLevelPC
  10.   if machineType() < 255 then
  11.     set theLevel to theLevelMac
  12.   else
  13.     set theLevel to theLevelPC
  14.   end if
  15.   puppetTempo(theTime)
  16.   if theChannel = 3 then
  17.     repeat while (the volume of sound 1 > theLevel) or (the volume of sound 2 > theLevel)
  18.       if the volume of sound 1 > theLevel then
  19.         set the volume of sound 1 to the volume of sound 1 - theGrain
  20.       end if
  21.       if the volume of sound 2 > theLevel then
  22.         set the volume of sound 2 to the volume of sound 2 - theGrain
  23.       end if
  24.       pWait(theTime)
  25.     end repeat
  26.     if theLevel = 0 then
  27.       sound stop 1
  28.       sound stop 2
  29.     end if
  30.   else
  31.     repeat while the volume of sound theChannel > theLevel
  32.       set the volume of sound theChannel to the volume of sound theChannel - theGrain
  33.       pWait(theTime)
  34.     end repeat
  35.     if theLevel = 0 then
  36.       sound stop theChannel
  37.     end if
  38.   end if
  39. end
  40.  
  41. on doFancyCursor
  42.   repeat with nn = 1 to 5
  43.     cursor("fancyC" & nn)
  44.     pWait(30)
  45.   end repeat
  46. end
  47.  
  48. on pWait theTicks
  49.   set tmpTicks to the ticks
  50.   repeat while the ticks < (tmpTicks + theTicks)
  51.   end repeat
  52. end
  53.  
  54. on MouseLoc
  55.   return point(the mouseH, the mouseV)
  56. end
  57.